Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Axion Lighting integration #125039

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from

Conversation

Vrncanac
Copy link

@Vrncanac Vrncanac commented Sep 1, 2024

Proposed change

This PR introduces a new integration for controlling Axion Lights via the Home Assistant UI. The integration allows users to connect their Axion DMX controllers with Home Assistant, offering support for various light types, including White, Tunable White, RGB, RGBW, and RGBWW. It provides a seamless way to manage lighting through Home Assistant, enhancing the automation capabilities for users with Axion Lighting systems.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Vrncanac

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

home-assistant bot commented Sep 1, 2024

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Device specific code should be stored in a separate library hosted on pypi, check https://developers.home-assistant.io/docs/development_checklist for mroe info

@home-assistant home-assistant bot marked this pull request as draft September 3, 2024 14:22
@Vrncanac Vrncanac marked this pull request as ready for review September 9, 2024 12:53
@home-assistant home-assistant bot requested a review from joostlek September 9, 2024 12:53
homeassistant/components/axion_dmx/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/manifest.json Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft September 10, 2024 15:17
@Vrncanac Vrncanac marked this pull request as ready for review September 12, 2024 21:42
@home-assistant home-assistant bot requested a review from joostlek September 12, 2024 21:42
homeassistant/components/axion_dmx/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/coordinator.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/coordinator.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong button

@home-assistant home-assistant bot marked this pull request as draft September 13, 2024 11:46
@Vrncanac Vrncanac marked this pull request as ready for review September 16, 2024 11:36
@home-assistant home-assistant bot requested a review from joostlek September 16, 2024 11:36
@joostlek
Copy link
Member

Also, if you think you did the right thing in the comment, feel free to resolve it. If you are unsure or if it was a question, or you have a question back, please leave it open

This one didn't got an answer #125039 (comment)

homeassistant/components/axion_dmx/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/coordinator.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft September 16, 2024 12:09
…ion can't be established, or in case of invalid authentication. Also, switch the value of selector to snake_case
@Vrncanac Vrncanac marked this pull request as ready for review September 17, 2024 17:56
@home-assistant home-assistant bot requested a review from joostlek September 17, 2024 17:56
Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me run an idea by you, please don't rush into implementing it because I am not sure if it would make this simpler.

What if we create a subclass for every light type? So we now have the AxionDMXLight, and then you could have the AxionDMXRGBLight which contains only the RGB logic for turning on and off (we can have the shared logic of the turning off and on in the base class, but the specifics in the sub class).

But this idea is with the assumption that you can't do RGB with a RGBW or RGBWW light.

I think this would separate the logic a lot more and saves us from doing a lot of light type checking. What do you think? (and again, please don't rush into implementing, you're the expert on these lights as you've been developing this, so I could be overseeing something)

homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
homeassistant/components/axion_dmx/light.py Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft September 20, 2024 09:26
@Vrncanac
Copy link
Author

Hi joostlek!

I've been thinking about this comment that you left, and there are few flaws with it.

What if we create a subclass for every light type? So we now have the AxionDMXLight, and then you could have the AxionDMXRGBLight which contains only the RGB logic for turning on and off (we can have the shared logic of the turning off and on in the base class, but the specifics in the sub class).

But this idea is with the assumption that you can't do RGB with a RGBW or RGBWW light.

You can do RGB with an RGBW or RGBWW light. Since each channel is controllable you could ignore the white on the RGBW and just do RGB if you wanted.

I see no gain in breaking each light into a sub-class, this will increase the complexity in terms of the number of classes (of course on the other hand it will reduce the complexity within each class). Also, since I tested this code on real hardware, and it works just as expected I think we're okay to leave it as-is.

@Vrncanac Vrncanac marked this pull request as ready for review September 25, 2024 08:27
@home-assistant home-assistant bot requested a review from joostlek September 25, 2024 08:27
@Vrncanac
Copy link
Author

Vrncanac commented Oct 6, 2024

Hi @joostlek, just wanted to check if there’s anything else needed from my side to help move this PR forward. Looking forward to your feedback. Thanks!

@joostlek
Copy link
Member

joostlek commented Oct 6, 2024

I did see your mail yesterday, it ended up in the spam. But last week was beta week so we were busy, I'll try to take a look at it again soon

@Vrncanac
Copy link
Author

Hi @joostlek, just wanted to follow up and see if there’s any chance you’ll be able to review the PR soon? I understand things can get busy, but it would be great to get some movement on this PR. Is there anything I can do to help move things along? Thanks!

@ChrisAllenIsAwesome
Copy link

Hello @joostlek and @Vrncanac , we have a couple customers who have installed Home Assistant in their house and were looking to integrate these lights/system. May I ask when you think it would be available for them to download?

Thanks so much!

@Vrncanac
Copy link
Author

Vrncanac commented Nov 1, 2024

Hello @joostlek and @autinerd!

Could we get some movement on this PR? You can pass it down to someone else on your team, if you guys are busy? As @ChrisAllenIsAwesome mentioned, we have some customers that are really excited about getting the Axion Lighting into the Home Assistant project, so that they can use the best from both worlds.

Thanks in advanced!

@ChrisAllenIsAwesome
Copy link

Sorry to be a pain on this, I have another person asking me about this integration. I have downloaded it and manually tried it with my system and it seems to be working properly, is there a bug or some other change needed before it can be published?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants